import utils from "@/libs/utils"
export default {
    mounted(el) {
        let more = el.querySelector('a'),
            moreArea = el.querySelector('.intro-more');
        let index = false;
        utils.addEvent(more, "click", () => {
            index = !index;
            if (index) {
                moreArea.style.display = "block";
            } else {
                moreArea.style.display = "none";
            }
        });

        utils.addEvent(document, "click", (e) => {
            if (e.target != more && e.target != moreArea) {
                index = !index;
                moreArea.style.display = "none";
            }
        });
    }
}